<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<!DOCTYPE html>
<html lang="zh-CN">
<head>

<fmt:setBundle basename="ApplicationMessage" />
<fmt:setLocale value="zh_CN" />

<%@ include file="/WEB-INF/include/meta.jsp"%>
<%@ include file="/WEB-INF/include/css.jsp"%>
<link href="${ctx.resource}/css/select2.css" rel="stylesheet">
<link href="${ctx.resource}/css/select2-bootstrap.css" rel="stylesheet">
<title>创建用户 - 租房宝金融管理平台</title>
</head>
<body>

	<%@ include file="/WEB-INF/include/header.jsp"%>

	<%@ include file="/WEB-INF/include/aside.jsp"%>
	<div class="content">
		<header class="header clearfix">
			<h3 class="pull-left">创建内部成员用户</h3>
			<%-- <div class="btn-toolbar pull-right">
	            <div class="btn-group">
	                <a href="${ctx}/payment/waiting/search" class="btn btn-default btn-shadow btn-shadow-default demo2do-btn" data-target="#" data-toggle="modal" title="过滤查询"><i class="glyphicon glyphicon-search"></i>&nbsp;&nbsp;过滤查询</a>
	            </div>
	          </div> --%>
		</header>
		<ul class="nav nav-tabs color-tabs">
			<li><a href="${ctx}/authority-control" class="unsettlement-tab">权限分配</a></li>
			<li><a href="${ctx}/create-user-role" class="settlement-tab">创建用户</a></li>
			<li class="active"><a href="javascript:void(0)"
				class="unsettlement-tab">创建内部成员用户</a></li>
			<li><a href="${ctx}/show-user-list" class="settlement-tab">用户列表</a></li>
		</ul>
		<div class="table-area">
			<div class="btn-toolbar  pull-left">
				<div class="row" style="margin-top: 10px;">
					<form class="form-horizontal">
						<div class="form-group">
							<div class="input-group input-group col-sm-offset-2 col-sm-3">
								<span class="input-group-addon">用户名</span> <input type="text"
									id="username" value="" class="form-control">
							</div>
							<div class="input-group col-sm-offset-2 col-sm-4">
								<span id="username_span" class="input-group col-sm-offset-3"
									style="display: none; color: red;">不能为空</span>
							</div>
						</div>
						<div class="form-group">
							<div class="col-sm-1 col-sm-offset-2">
								<button class="btn btn-primary" id="submit"
									style="text-align: center;">确认</button>
							</div>
							<div class="col-sm-1 col-sm-offset-1">
								<button type="reset" class="btn" id="reset"
									style="text-align: center;">重置</button>
							</div>
						</div>
					</form>
				</div>
			</div>
		</div>
		<%@ include file="/WEB-INF/include/footer.jsp"%>
	</div>

	<%@ include file="/WEB-INF/include/script.jsp"%>
	<script src="${ctx.resource}/js/bootstrap-switch.min.js"></script>
	<script src="${ctx.resource}/js/bootstrap-modal-trigger.js"></script>
	<script src="${ctx.resource}/js/bootstrap.validate.js"></script>
	<script src="${ctx.resource}/js/bootstrap.validate.en.js"></script>
	<script src="${ctx.resource}/js/bootstrap-alert-fade-trigger.js"></script>
	<script type="text/javascript">
		$(document).ready(function() {
			$("#submit").click(function(event) {
				var username = $.trim($("#username").val());
				if (username == "") {
					alert("用户名不能为空");
				} else {
					$.post('${ctx}/create-internal-user-role', {
						userName : username
					}, function(data) {
						alert(data);
						location.reload(true);
					});
				}
				event.preventDefault();
				return false;
			});
		});
	</script>
</body>
</html>